
<%-- Composition Page: index.jsp --%>
<%@ page contentType="text/html; charset=iso-8859-1" language="java" %>
<%@page import="nl.hva.web.mvcwebapp.doa.PageDAO"%>
<%@page import="nl.hva.web.mvcwebapp.models.Page"%>
<%
//Meta
    request.setAttribute("css", request.getContextPath() + "/style.css"); //Generic path to CSS

    Page pagetastic = PageDAO.getPageByPath("/forumThread/forum.jsp");
    request.setAttribute("title", pagetastic.getPageName()); //Page title
    request.setAttribute("background", pagetastic.getPageBackground()); //Background types; linen, chalk, plain
    request.setAttribute("color", pagetastic.getPageColor()); //Color types; red, orange, green
    request.setAttribute("layout", pagetastic.getPageLayout()); //Color types; red, orange, green
//Widgets
    request.setAttribute("header", PageDAO.getWidgetsByPathAndLocId(pagetastic.getPagePath(), 0)); //Header / Menu widgets
    request.setAttribute("top", PageDAO.getWidgetsByPathAndLocId(pagetastic.getPagePath(), 1)); // Wrapper Top / Banner widgets
    request.setAttribute("sidebar", PageDAO.getWidgetsByPathAndLocId(pagetastic.getPagePath(), 2)); // Sidebar widgets
    request.setAttribute("bottom", PageDAO.getWidgetsByPathAndLocId(pagetastic.getPagePath(), 3)); //Wrapper Bottom widgets
    request.setAttribute("footer", PageDAO.getWidgetsByPathAndLocId(pagetastic.getPagePath(), 4)); //Footer widgets
    request.setAttribute("url", request.getContextPath()); //Sidebar Content
//Body Content
    request.setAttribute("body", "/WEB-INF/body/forum/topic_add-body.jsp"); //Body Content
%>
<%-- Include abstract layout --%>
<jsp:include page="${layout}" />
